package com.wuming.caiwu.service;


import com.wuming.caiwu.core.BusinessException;
import com.wuming.caiwu.model.Menu;

import java.util.List;

/**
 * 首页菜单基本信息服务
 * Created by hanfei on 16/4/19.
 */
public interface MenuService {

    /**
     * 保存首页菜单基本信息
     *
     * @param student 首页菜单基本信息
     * @throws BusinessException
     */
    void saveMenu(Menu student) throws BusinessException;

    /**
     * 更新首页菜单基本信息
     *
     * @param student 首页菜单基本信息
     * @throws BusinessException
     */
    void modifyMenu(Menu student) throws BusinessException;

    List<Menu> getMenusByPage
            (String menuName, int pageIndex, int pageSize) throws BusinessException;


    int getTotal(String menuName) throws BusinessException;

    /**
     * 根据id删除首页菜单基本信息
     *
     * @param id 首页菜单id
     * @throws BusinessException
     */
    void removeMenuById(Long id) throws BusinessException;

    /**
     * 根据id查询首页菜单基本信息
     *
     * @param id 首页菜单id
     * @return 首页菜单基本信息
     * @throws BusinessException
     */
    Menu getMenuById(Long id) throws BusinessException;
}
